using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using DAL;
using DTO;
using BUS;
using Utility;
public partial class User_Default3 : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            Loaddata();
        }
    }
     private void Loaddata()
    {
        tbHinhAnhCollection hinhanh = HinhAnh_BUS.GetByMaMH(91);
        Repeater1.DataSource = hinhanh;
        Repeater1.DataBind();

    }
    protected void Repeater1_ItemDataBound(object sender, RepeaterItemEventArgs e)
    {
        if(e.Item.ItemType==ListItemType.Item || e.Item.ItemType==ListItemType.AlternatingItem)
        {
            HinhAnh_DTO hinh = (HinhAnh_DTO)e.Item.DataItem;
            Image image = (Image)e.Item.FindControl("Image1");
            image.ImageUrl = "~/photos/thumb/" +hinh.Hinh;
            //Image image1 = (Image)e.Item.FindControl("Image2");
            //image1.ImageUrl = "~/photos/thumb/" + hinh.Hinh;

        }
    }
}
}
